package com.runda.partypolicy.app.page.adapter;




import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.runda.partypolicy.R;
import com.runda.partypolicy.app.repository.bean.ItemData;


import java.util.List;

import androidx.annotation.Nullable;

/**
 * author:  RD_YH
 * date:    2019/3/15
 * version: v1.0
 * description:
 */
public class Adapter_Item extends BaseQuickAdapter<ItemData, BaseViewHolder> {
    OnItemClickListener itemOnClickListener;

    public void setItemOnClickListener(OnItemClickListener itemOnClickListener) {
        this.itemOnClickListener = itemOnClickListener;
    }

    public Adapter_Item(int layoutResId, @Nullable List<ItemData> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ItemData item) {

        helper.setImageResource(R.id.item_image, item.getImage());
        helper.setText(R.id.item_text, item.getText());

    }
}
